package techstudy;

import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvFileSource;
import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.ValueSource;

public class InnerTestClassDemo {
	
	int add(int x, int y)
	{
		return x +y;
	}
	
	public static void main(String[] args) {
		
	}
	
	public static class UnitTest {
		@Test
		void simple() {
			assertEquals(5, new InnerTestClassDemo().add(1, 4));
		}
		
		@Test
		void spyByOverride() {
			assertEquals(-3, new InnerTestClassDemo() {
				@Override
				int add(int x, int y) {
					return x-y;
				}
				
			}.add(1, 4));
		}
	

	}

}
